VPU user guide¶
Copyright © Quectel Wireless Solutions Co., Ltd. 2026. All rights reserved.
What is VPU¶
VPU (Video Processing Unit) is the dedicated video encode/decode hardware integrated in the RK3576. It works independently of the CPU and is responsible for encoding and decoding H.264, H.265, AV1, VP9, JPEG and other video/image formats.
What happens without a VPU? When playing HD video, the CPU must decode in software at full load, which easily causes lag, heat, and high power consumption. With a VPU, decoding is done entirely in hardware, leaving the CPU free for other tasks — even 4K video plays smoothly.
VPU Use Cases¶
Scenario |
Description |
Operation |
|---|---|---|
Video playback |
Hardware decode H.264/H.265/AV1/VP9 video |
GStreamer playback |
Video recording |
Hardware encode camera frames to H.264 file |
GStreamer encoding |
Video transcoding |
Convert one format to another |
Decode + encode in series |
Video streaming |
Real-time encode and network transmission |
Encode + UDP output |
Using the VPU on M2¶
Scenario 1: Hardware Decode Video Playback (Most Common)¶
Play the onboard test video with hardware decode:
# Play the onboard 720p test video (hardware decode)
gst-launch-1.0 filesrc location=/oem/SampleVideo_1280x720_5mb.mp4 ! \
qtdemux ! h264parse ! mppvideodec ! waylandsink
Element |
Function |
|---|---|
filesrc |
Read video file |
qtdemux |
Demux (extract H.264 stream) |
h264parse |
Parse H.264 bitstream |
mppvideodec |
VPU hardware decode (key) |
waylandsink |
Display to screen (GPU rendering) |
Smooth playback with low CPU usage (observe with top; the decode process CPU usage should be very low) indicates the VPU is working.
Scenario 2: Hardware Encoding (Record Video)¶
Hardware encode test frames to an H.264 file:
# Generate 30 frames of test video and hardware encode to H.264
gst-launch-1.0 videotestsrc num-buffers=30 ! videoconvert ! \
video/x-raw,format=NV12,width=640,height=480 ! \
mpph264enc ! filesink location=/tmp/test.h264
# View the generated file
ls -la /tmp/test.h264
You can also re-encode hardware-decoded video (transcoding):
gst-launch-1.0 -e filesrc location=/oem/SampleVideo_1280x720_5mb.mp4 ! \
qtdemux ! h264parse ! mppvideodec ! videoconvert ! \
video/x-raw,format=NV12 ! mpph264enc ! filesink location=/tmp/out.h264
Scenario 3: Decode Performance Test (Verify VPU Speed)¶
Use the MPP decode test tool to see how many frames per second the VPU can decode:
# Decode 200 frames of 720p H.264 raw stream
mpi_dec_test -i /oem/200frames_count.h264 -t 7 -w 1280 -h 720 -n 200 -v f
M2 measured results:
Resolution |
Format |
Instances |
Frame Rate |
Real-time Multiplier |
|---|---|---|---|---|
1280x720 |
H.264 |
1 |
3003 fps |
100x |
1920x1080 |
H.264 |
1 |
2962 fps |
124x |
1280x720 |
H.264 |
4 concurrent |
2907 fps/stream |
97x/stream |
1280x720 |
H.264 |
8 concurrent |
2840 fps/stream |
95x/stream |
8-stream 720p concurrent decoding with no pressure — suitable for NVR / multi-channel surveillance scenarios.
VPU Supported Formats¶
Type |
Format |
GStreamer Plugin |
|---|---|---|
Decode |
H.264 / H.265 / AV1 / VP8 / VP9 / MPEG4 |
mppvideodec |
Decode |
JPEG |
mppjpegdec |
Encode |
H.264 |
mpph264enc |
Encode |
H.265 |
mpph265enc |
Encode |
JPEG |
mppjpegenc |
Environment Check (One-Step VPU Readiness)¶
# VPU device node exists
ls /dev/mpp_service
# GStreamer hardware plugins exist
gst-inspect-1.0 | grep -i rockchipmpp
# Expected: mpph264enc / mpph265enc / mppjpegdec / mppjpegenc / mppvideodec
FAQ¶
Problem |
Solution |
|---|---|
Black screen / no video |
Run in a graphical desktop session; waylandsink requires a Wayland environment |
mppvideodec not found |
Install gstreamer1.0-rockchip1 (preinstalled on both platforms) |
Encode reports invalid format |
Input pixel format must be NV12 (add video/x-raw,format=NV12) |
Decode shows artifacts |
Input must be H.264 raw stream or mp4 container (demux with qtdemux first) |